package com.cloud.api.clients;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "wechat", url = "https://api.weixin.qq.com")
public interface WeChatClient {

    /* 获取微信用户openid和登录态session_key */
    @GetMapping("/sns/jscode2session")
    String getUserLoginSession(
            @RequestParam("appid") String appid,
            @RequestParam("secret") String secret,
            @RequestParam("js_code") String js_code,
            @RequestParam("grant_type") String grant_type
    );

}
